package de.hsowl.tod4a.global.logging;

import android.util.Log;

/**
 * An Android only logging class
 * 
 * @author Sebastian Witt
 * 
 */
public class AndroidLogImpl implements de.hsowl.tod4a.global.logging.Log {

	private String LOG_TAG;

	public AndroidLogImpl(Class<?> clazz) {
		LOG_TAG = clazz.getName();
		vendor("Android logger created");
	}

	/**
	 * See {@link de.hsowl.tod4a.global.logging.Log#debug(String)}
	 */
	public void debug(String msg) {
		Log.d(LOG_TAG, msg);
	}

	/**
	 * See {@link de.hsowl.tod4a.global.logging.Log#vendor(String)}
	 */
	public void vendor(String msg) {
		Log.v(LOG_TAG, msg);
	}

	/**
	 * See {@link de.hsowl.tod4a.global.logging.Log#error(String)}
	 */
	public void error(String msg) {
		Log.e(LOG_TAG, msg);
	}

	/**
	 * See {@link de.hsowl.tod4a.global.logging.Log#error(String, Throwable)}
	 */
	public void error(String msg, Throwable e) {
		Log.e(LOG_TAG, msg, e);
	}

	/**
	 * See {@link de.hsowl.tod4a.global.logging.Log#debug(String, Throwable)}
	 */
	public void debug(String msg, Throwable e) {
		Log.d(LOG_TAG, msg, e);
	}

	/**
	 * See {@link de.hsowl.tod4a.global.logging.Log#vendor(String, Throwable)}
	 */
	public void vendor(String msg, Throwable e) {
		Log.v(LOG_TAG, msg, e);
	}

	/**
	 * See {@link de.hsowl.tod4a.global.logging.Log#information(String)}
	 */
	public void information(String msg) {
		Log.i(LOG_TAG, msg);
	}

	/**
	 * See
	 * {@link de.hsowl.tod4a.global.logging.Log#information(String, Throwable)}
	 */
	public void information(String msg, Throwable e) {
		Log.i(LOG_TAG, msg, e);
	}
}
